<ion-header-bar style="background-image:none">
  <div class="buttons">
    <button ui-sref="login" style="color: rgb(110, 189, 219);"
            class="button back-button no-animation button-icon icon buttons button-clear ion-ios-arrow-back">
    </button>
  </div>
  <h1 class="title" style="color: #6ebddb">欢迎加入八戒上学</h1>
</ion-header-bar>
<ion-view>
  <ion-content class="has-header" ng-controller="registerCtrl" overflow-scroll="true" style="overflow: hidden">
    <form>
      <div ng-show="curstep">
        <ul class="aui-list aui-form-list">
          <input type="hidden" ng-model="formdata.university">
          <li class="aui-list-item" ng-click="seleSch()">
            <div class="aui-list-item-inner">
              <div class="aui-list-item-label">
                学校
              </div>
              <div class="aui-list-item-input">
                <input type="text" ng-model="name" style="background: #fff" placeholder="点我选择学校" readonly>
              </div>
            </div>
          </li>
          <li class="aui-list-item">
            <div class="aui-list-item-inner">
              <div class="aui-list-item-label">
                学院
              </div>
              <div class="aui-list-item-input">
                <input ng-model="formdata.institution" type="text"/>
              </div>
            </div>
          </li>
          <li class="aui-list-item">
            <div class="aui-list-item-inner">
              <div class="aui-list-item-label">
                入学年份
              </div>
              <div class="aui-list-item-input">
                <select ng-model="formdata.enrollYear">
                  <option value="2016">2016</option>
                  <option value="2015">2015</option>
                  <option value="2014">2014</option>
                  <option value="2013">2013</option>
                </select>
              </div>
            </div>

          </li>
          <li class="aui-list-item">
            <div class="aui-list-item-inner" align="center">
              <div class="aui-list-item-input">
                <label style="margin-right: 20px;"><input class="aui-radio" type="radio" name="level" ng-model="formdata.level" value="0"> 专科</label>
                <label style="margin-right: 20px;"><input class="aui-radio" type="radio" name="level" ng-model="formdata.level" checked value="1"> 本科</label>
                <label><input class="aui-radio" type="radio" name="level" ng-model="formdata.level" value="2"> 研究生</label>
              </div>
            </div>
          </li>
        </ul>
        <div class="item" style="border:none;">
          <button ng-click="curstep=false" style="border-radius: initial;"
                  class="button button-block button-positive" type="button">下一步
          </button>
        </div>
      </div>
      <div ng-hide="curstep">
        <ul class="aui-list aui-form-list rglist">
          <li class="aui-list-item">
            <div class="aui-list-item-inner">
              <div class="aui-list-item-label">
                用户名
              </div>
              <div class="aui-list-item-input item-input">
                <input ng-model="formdata.username" type="text"/>
                <div ng-show="checkname">
                  <small style="color: red;font-size: 0.6rem;white-space: nowrap;min-width: 93px;">该用户名已存在</small>
                </div>
              </div>
            </div>
          </li>
          <li class="aui-list-item">
            <div class="aui-list-item-inner">
              <div class="aui-list-item-label">
                密码
              </div>
              <div class="aui-list-item-input item-input">
                <input type="password" ng-model="formdata.password" minlength="8" maxlength="20"/>
              </div>
            </div>
          </li>
          <li class="aui-list-item">
            <div class="aui-list-item-inner">
              <div class="aui-list-item-label">
                性别
              </div>
              <div class="aui-list-item-input">
                <label style="margin-right: 20px;"><input class="aui-radio" type="radio" name="sex" ng-model="formdata.sex" value="0" checked> 男</label>
                <label style="margin-right: 20px;"><input class="aui-radio" type="radio" name="sex" ng-model="formdata.sex" value="1"> 女</label>
              </div>
            </div>
          </li>
          <li class="aui-list-item">
            <div class="aui-list-item-inner">
              <div class="aui-list-item-label">
                Email
              </div>
              <div class="aui-list-item-input item-input">
                <!--<input type="text" class="aui-col-xs-8" ng-model="formdata.cellphone" >-->
                <input type="text" class="aui-col-xs-8" ng-model="formdata.email">
                <div class="aui-btn aui-btn-info aui-col-xs-4" style="margin-right: 0px;" ng-click="sendCaptcha(formdata.email)" ng-class="paraclass"
                     ng-bind="paracont">获取验证码
                </div>
              </div>
            </div>
          </li>
          <li class="aui-list-item">
            <div class="aui-list-item-inner">
              <div class="aui-list-item-label">
                验证码
              </div>
              <div class="aui-list-item-input item-input">
                <input type="text" class="aui-col-xs-8" ng-model="formData.captcha">&nbsp;
                <div class="aui-btn aui-btn-info aui-col-xs-4" ng-click="checkCaptcha(formdata.email, formData.captcha)">验证</div>
              </div>
            </div>
          </li>
          <li class="aui-list-item">
            <div class="aui-list-item-inner">
              <div class="aui-list-item-input" style="padding-bottom: 10px">
                <p style="line-height: 0.6rem;padding-bottom: 2px;text-align: center">
                  <input style="width: 0.6rem;height: 0.6rem;" class="aui-radio" ng-change="ischecked()" type="checkbox"
                         ng-model="agg_checked" value="0">
                  <small ng-click="agreecon()">同意注册协议</small>
                  &nbsp;
                  <small ng-show="msg" style="color:red">您还未同意呢</small>
                </p>
              </div>
            </div>
          </li>
          <!-- <li class="aui-list-item" style="border-bottom: none">
             <div class="aui-list-item-inner aui-list-item-center aui-list-item-btn">
               <div ng-click="login()" class="aui-btn aui-btn-info aui-margin-r-5">注册</div>
               <div ng-click="curstep=true" class="aui-btn aui-btn-danger aui-margin-l-5">取消</div>
             </div>
           </li>-->
        </ul>
        <div class="item" style="border:none;padding-top: 0px">
          <button ng-click="register()"
                  class="button button-block button-positive" type="button">注册
          </button>
          <button ng-click="curstep=true"
                  class="button button-block button-stable" type="button" style="background-color: #e0e0e0;">上一步
          </button>
        </div>
      </div>
    </form>

  </ion-content>
</ion-view>
